#ifndef CVFILTERS_H
#define CVFILTERS_H

#include <QImage>
#include <QDebug>
#include <math.h>

#endif // CVFILTERS_H


float **generateGaussianKernel(float variance);

QImage imageConvolution2by2(QImage originalImage, float kernel[][2]);

float **testImageConvolution2by2(QImage originalImage, float kernel[][2]);

QImage normalizeImage(QImage originalImage);

float **matrixImageConvolution3by3(QImage originalImage, float kernel[][3]);


void normalizeMatrix(float **matrixImage, int rows, int cols);

QImage matrixToImage(float **matrixImg, int rows, int cols);

QImage imageConvolution3by3(QImage originalImage, float kernel[][3]);

QImage imageConvolution5by5(QImage originalImage, float kernel[][3]);

QImage gaussianFilter(QImage originalImage);

QImage boxFilter(QImage originalImage);

QImage sharpeningFilter(QImage originalImage);

QImage sobelVerticalFilter(QImage originalImage);

QImage sobelHorizontalFilter(QImage originalImage);

QImage medianFilter(QImage originalImage);

QImage laplacianFilter(QImage originalImage);

QImage rankFilter(QImage originalImage, int dim);

QImage sobelModuleFilter(QImage originalImage);

QImage sobelPhaseFilter(QImage originalImage);

QImage robertsModuleFilter(QImage originalImage);

QImage robertsPhaseFilter(QImage originalImage);

QImage isotropicVerticalFilter(QImage originalImage);

QImage isotropicHorizontalFilter(QImage originalImage);

void matrixConvolutionNbyN(QImage originalImage, float **kernel, int dim, float **matrixImgA);

float getVarianceFromArray(QVector<int> array);

QImage nagaoFilter(QImage originalImage);

QImage isotropicModuleFilter(QImage originalImage);

QImage isotropicPhaseFilter(QImage originalImage);

QImage prewittVerticalFilter(QImage originalImage);

QImage prewittHorizontalFilter(QImage originalImage);


QImage prewittModuleFilter(QImage originalImage);

QImage prewittPhaseFilter(QImage originalImage);


void rotateKernel(float kernel[3][3]);

QImage kirschFilter(QImage originalImage);

QImage threeNineFilter(QImage originalImage);

QImage DoGFilter(QImage originalImage, float firstVar, float secondVar);

QImage uniformNoise(QImage originalImage, int maxNoiseIntensity);

QImage gaussianNoise(QImage originalImage, float mean, float variance);

QImage saltPepperNoise(QImage originalImage, int percentage);

QImage impulseNoise(QImage originalImage, int percentage);

